<?php TPL::output('aomas/global/header.tpl.htm'); ?>
<link rel="stylesheet" href="<?php echo G_STATIC_URL; ?>/aomas/css/common/toast.style.css">
<link rel="stylesheet" href="<?php echo G_STATIC_URL; ?>/aomas/css/all_product/all_product.css">
<?php TPL::output('aomas/global/nav.tpl.htm'); ?>

        <div class="all_product">

            <div class="home-section">

                <div class="section-prod-all">
                    <p class="prod-all-p">所有产品分类</p>
                    <ul class="pro-cate-all">
                        <?php foreach($this->category_list  AS $key => $item){?>
                        <li>
                            <a href="./cat-<?php echo $item['id'];?>" <?php if($_GET['cat']==$item['id']){ ?> class="active" <?php }?> > <?php echo $item['title'];?></a>
                        </li>
                        <?php }?>
                    </ul>
                    <ul class="pro-list row">

                        <?php foreach( $this->goods_list AS $ket=>$val){ ?>
                        <li class="col-md-3 col-sm-3 col-xs-3">
                            <div class="pro-li-body">
                                <div class="img-block" data-src="/product/goods-<?php echo $val['goods_id'] ?>/">
                                    <div class="am-table">
                                        <div class="am-tablecell">
                                            <img src="<?php echo get_goods_cover_url($val['goods_id'],'mid',$val['cover']); ?>" alt="<?php echo $val['goods_name']; ?>">
                                        </div>
                                    </div>
                                </div>
                                <p class="pro-li-title">&nbsp;&nbsp;<?php echo $val['goods_name']; ?></p>
                                <p class="pro-li-des">&nbsp;&nbsp;<?php echo $val['goods_brief']?></p>
                                <?php if($val['goods_style']){?>
                                <ul class="pro-li-label">
                                    <?php foreach($val['goods_style'] AS $sub_key=> $sub_item){ ?>

                                    <li data-color="<?php echo $sub_item['goods_color'];?>" data-src="<?php echo get_goods_cover_url($val['goods_id'],'mid',$sub_item['goods_color_pic']); ?>" style="border: 1px solid #f00" class="no-active">
                                        <span style="background: <?php echo $sub_item['goods_color'];?>"></span>
                                    </li>
                                    <?php }?>
                                    <!--<li data-color="#0f0" data-src="#0f0" style="border: 1px solid #0f0">-->
                                        <!--<span style="background: #0f0"></span>-->
                                    <!--</li>-->
                                </ul>
                                <?php }?>

                                <div class="pro-li-price">
                                    <span class="new-price">&nbsp;&nbsp;<?php echo $val['shop_price']?>元</span>
                                    <span class="old-price">&nbsp;&nbsp;<?php echo $val['market_price']?>元</span>
                                </div>

                                <div class="pro-li-do">
                                    <a class="look-info" href="/product/goods-<?php echo $val['goods_id'] ?>/">查看详情</a>
                                    <a class="to-shop js-add-cart" data-id="<?php echo $val['goods_id'];?>">加入收藏夹</a>
                                </div>
                            </div>
                        </li>
                        <?php };?>
                        
                    </ul>
                    
                </div>

            </div>
            <?php echo $this->pagination; ?>

            <!-- 尾部全局 -->
            <?php TPL::output('aomas/global/footer.tpl.htm'); ?>

        </div>

        <script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
        <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
        <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
        <script src="<?php echo G_STATIC_URL; ?>/aomas/js/common/toast.script.js" type="text/javascript"></script>
        <script src="<?php echo G_STATIC_URL; ?>/aomas/js/common/common.js" type="text/javascript"></script>
        <script src="<?php echo G_STATIC_URL; ?>/aomas/js/all_product/all_product.js" type="text/javascript"></script>

    </body>
</html>